package com.project.service;

import com.alibaba.fastjson.JSONObject;
import com.project.entity.School;

import java.util.List;

/**
 * Created by WheelChen on 2017/5/2.
 */
public interface SchoolService {
    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 增加学院
     * @param school
     * @return
     */
     int add(School school);

    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id删除学院
     * @param id
     * @return
     */
     int remove(Integer id);

    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id修改学院信息
     * @param school
     * @return
     */
     int modify(School school);

    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据id寻找学院信息
     * @param id
     * @return
     */
     School findOne(Integer id);

    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据universityid寻找学院信息以及学院下的管理员
     * @param universityid
     * @return
     */
     List<JSONObject> findBatchWithAdminByUniversityId(Integer universityid) throws Exception;

    /**
     * author: WheelChen
     * date: 2017-5-4
     * function: 根据universityid寻找学院信息
     * @param universityid
     * @return
     */
     List<School> findBatchByUniversityId(Integer universityid);



    /**
     * author: WheelChen
     * date: 2017/7/11
     * function: 检查是否已存在同一所学校相同学院
     *
     * @param school
     * @return
     */
    boolean checkUniversityIdAndNameIsExist(School school);





}
